<?php

/* @var $this \yii\web\View */
/* @var $content string */

use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use frontend\assets\AppAsset;
use common\widgets\Alert;
use common\components\Config;
use common\components\Tools;
$home_url = Yii::$app->request->getHostInfo();
$per_url = Yii::$app->params['imgurl'];
$top_menu = Tools::getTopmenu();
$footer_menu = Tools::getFootermenu();

AppAsset::register($this);

$this->registerCss("

");

?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="<?= Yii::$app->charset ?>">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <?= Html::csrfMetaTags() ?>
    <title><?= Html::encode($this->title) ?></title>
    <?php $this->head() ?>
    <?= Html::cssFile('@web/css/responsive-menu.css') ?>
    
    <?= Html::cssFile('@web/css/font.css') ?>
    <?= Html::cssFile('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css') ?>
    <?= Html::cssFile('@web/css/share.css') ?>
    
    <style type="text/css">
        html,body{height:100%}
        body{margin:0;font-size:16px;font-family:sans-serif;background: #fff;}
        .wrapper{margin:0 auto;padding:1px 3em;height:100%}
        header{background-color:#ffffffa8;position: fixed;width:100%;z-index: 999999;top:0px;left:0px;box-shadow: 0px 0px 10px #ccc}
        header:after{content:" ";display:table;clear:both}
        .brand,h1,h2,h3{font-weight:400;letter-spacing:1px}
        h4,h5,h6{letter-spacing:1px}
        h1{font-size:28px}
        .main .dev-output pre{overflow:auto;max-height:500px;background-color:#ebf4fd;padding:0 1em 1em}
        .brand{float:left;height:80px}
        .brand p{margin:0}
        .rm-nav{letter-spacing:1px}
        .logo{height:40px;}
        .rm-toggle.rm-button{margin-top:25px}
        .rm-css-animate.rm-menu-expanded{max-height:none;display:block}
        .rm-container.rm-layout-expanded{float:right}
        .rm-nav li a,.rm-top-menu a{padding:.75rem 1rem;font-size:.9em;line-height:1.5rem;text-transform:uppercase}
        .rm-layout-expanded .rm-nav>ul>li>a,.rm-layout-expanded .rm-top-menu>.rm-menu-item>a{height:80px;line-height:80px}
        .main{background-image:url(/img/cloud.jpg);background-position:center top;background-repeat:repeat-x;min-height:100%;padding-top:1px}
        .tagline{width:360px;font-size:1.75em;font-weight:700;letter-spacing:2px;line-height:1.2;text-align:center;margin:275px auto;color:#1a88d3}
        .tagline strong{font-size:1.3em}
        .dev-output{background-color:#e1eaf3;background-color:rgba(255,255,255,.85);color:#000;padding:2em;margin-bottom:2em}
        .rm-nav ul, .rm-menu {background-color: #fff;}
        .rm-menu.rm-top-menu {background-color: #ffffff00;}
        .rm-nav li a, .rm-menu-item a {color: #333;}
    </style>
</head>
<body>
<?php $this->beginBody() ?>

<div class="">
    <header>
        <div class="wrapper">
            <div class="brand">
                <p><a href="/home/default/index" class="logo"><img src="<?php echo $per_url . Config::getValue('img_logo')?>" style="height:40px;margin: 20px 0px;"></a></p>
            </div>
            <div class="rm-container">
                <a class="rm-toggle rm-button rm-nojs" href="#">导航菜单</a>
                <nav class="rm-nav rm-nojs rm-lighten">
                    <ul>
                        <?php foreach($top_menu as $v){ ?>
                            <li>
                                <?php if(!empty($v['options'])){ ?>
                                    <a href="#"><?php echo $v['title']?></a>
                                <?php }else{ ?>
                                    <a href="<?php echo $v['code']?>"><?php echo $v['title']?></a>
                                <?php }?>
                                <?php if(!empty($v['options'])){ ?>
                                    <ul>
                                        <?php foreach($v['options'] as $val){ ?>
                                            <li><a href="<?php echo $val['code']?>"><?php echo $val['title']?></a></li>
                                        <?php }?>
                                    </ul>
                                <?php }?>
                            </li>
                        <?php }?>
                        <?php if(!Yii::$app->user->isGuest){ ?>
                        <li>
                            <a href="/home/default/logout">退出</a>
                        </li>
                        <?php }?>
                    </ul>
                </nav>
            </div>
        </div>
    </header>

    
    <?= $content ?>
   
</div>


<style type="text/css">
    .myfooter{margin-top: 0px;padding-bottom:30px;padding:10px;text-align: center;font-weight: 300;font-size: 14px;color:#333;}
    .myfooter a{color:#333;text-decoration: none;}
</style>
<div class="share">
    <div class="entry-share">
        <div class="share-box">
            <ul class="bdsharebuttonbox">
                <li class="share-pu">分享到：</li>
                <li><a title="分享到新浪微博" class="fa fa-weibo" data-cmd="tsina" onclick="return false;" href="#"></a></li>
                <li><a title="分享到微信" class="fa fa-wechat" data-cmd="weixin" onclick="return false;" href="#"></a></li>
                <li><a title="分享到人人网" class="fa fa-renren" data-cmd="renren" onclick="return false;" href="#"></a></li>
                <li><a title="分享到QQ空间" class="fa fa-qq" data-cmd="qzone" onclick="return false;" href="#"></a></li>
                <li><a title="分享到Facebook" class="fa fa-facebook" data-cmd="fbook" onclick="return false;" href="#"></a></li>
                <li><a title="分享到Twitter" class="fa fa-twitter" data-cmd="twi" onclick="return false;" href="#"></a></li>
                <li><a title="更多" class="bds_more fa fa-plus-circle" data-cmd="more" onclick="return false;" href="#"></a></li>
            </ul>
        </div>
    </div>
    <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdPic":"","bdStyle":"0","bdSize":"16"},"share":{},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
</div>

<div class="myfooter">
    <p>
        <?php foreach($footer_menu as $v){ ?>
            <span><a href="<?php echo $v['code']?>"><?php echo $v['title']?></a></span> |
        <?php }?>
    </p>
    <p class="beian">
        Copyright © <?php echo date('Y');?> <?php echo Config::getValue('company_name')?>
        <a href="http://www.miitbeian.gov.cn" target="_blank" style="color:#4aacf1;font-weight: 600;">备案号：<?php echo Config::getValue('beian')?>  </a>
    </p>

</div>

<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
<script>
    jQuery(function ($) {
        var menu = $('.rm-nav').rMenu({
            minWidth: '960px',
        });
    });
</script>
<?= Html::jsFile('@web/js/modernizr.min.js') ?>
<?= Html::jsFile('@web/js/modernizr-custom.js') ?>
<?= Html::jsFile('@web/js/responsive-menu.js') ?>
